﻿
//-------------------------------------------------------------------------------
// <copyright file="SwfObjectParameter.cs" company="GrannetDotNet Software">
//     Copyright © 2009 GrannetDotNet Software. All rights reserved.
// </copyright>
// <author>Grant Harmeyer</author>
//-------------------------------------------------------------------------------

namespace GrannetDotNet.Web.UI.WebControls
{
    using System;
    using System.ComponentModel;
    using System.Web.UI;

    /// <summary>
    /// Class used to define a single variable for a Flash movie. 
    /// </summary>
    /// <remarks>
    /// <para>
    /// This object will be used to provide an externally defined variable to the a Flash movie. 
    /// The variable will then be supplied to the movie using the flashvars parameter.
    /// </para>
    /// </remarks>
    public class FlashVar
    {
        #region [ .ctors ]

        /// <summary>
        /// Creates a new instance of a FlashVar object
        /// </summary>
        public FlashVar()
        { 
        }

        /// <summary>
        /// Creates a new instance of a FlashVar object
        /// </summary>
        /// <param name="name">The name of the flash variable</param>
        /// <param name="value">The value of the flash variable</param>
        public FlashVar(string name, string value)
        {
            this.Name  = name;
            this.Value = value;
        }

        #endregion

        #region [ Properties ]

        /// <summary>
        /// Gets or sets a value indicating the name of the variable
        /// </summary>
        [Browsable(true),
        PersistenceMode(PersistenceMode.Attribute)]
        public string Name 
        { 
            get; 
            set; 
        }

        /// <summary>
        /// Gets or sets a value indicating the value of the variable
        /// </summary>
        [Browsable(true),
        PersistenceMode(PersistenceMode.Attribute)]
        public string Value 
        { 
            get; 
            set; 
        }

        #endregion
    }
}